import re
    
try:
    p = re.compile(r'(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}', re.MULTILINE | re.IGNORECASE)
    
    filename = raw_input('Enter file name:')
    f = open(filename, 'r')
    
    for line in f:
        m = p.search(line)
        if m is not None:
            print m.group()

    f.close()
except IOError, e:
    print 'file open error:',